/*
 * Copyright (c) 2016- 2020 qolome.com Inc. All Rights Reserved.
 * ProjectName: qolome-knowledge
 * FileName: Test.java
 * Author: jiangfeng@qolome.com
 * Date: 2020/3/11 上午9:11
 * LastModified: 2020/03/11 09:11:11
 */

package com.qolome.knowledge.design.pattern.composite.demo.transparent;

import lombok.extern.slf4j.Slf4j;

/**
 * @author Qolome
 * @version V1.0
 * @Description 测试类
 * @date 2020年 03月11日 09:11:48
 */
@Slf4j
public class Test {

    public static void main(String[] args) {

      log.info("=========  透明的组合模式==========");

      CourseComponet javaBase = new Course("Java基础",588);
      CourseComponet ai = new Course("AI算法",599);
      CourseComponet designPattern = new Course("设计模式",200);
        CourseComponet javaSource = new Course("源码分析",2000);
        CourseComponet secondKill = new Course("秒杀",5000);
      CourseComponet coursePackage = new CoursePackage("Java架构师",2);
      coursePackage.addChid(designPattern);
        coursePackage.addChid(javaSource);
        coursePackage.addChid(secondKill);
        CourseComponet catalog = new CoursePackage("Java架构师",1);
        catalog.addChid(javaBase);
        catalog.addChid(ai);
        catalog.addChid(javaSource);
        catalog.addChid(secondKill);
        catalog.addChid(coursePackage);
        catalog.print();





    }
}
